/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package View.ClusterizationPanel;

import java.awt.Color;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author vf
 */
public class ClustersTableModel extends DefaultTableModel {

    Class[] types;
    boolean[] editable;

    public ClustersTableModel (){
        super(new Object [][]{},new String [] {"No", "Name", "Color"});
        types = new Class [] {java.lang.Integer.class,
                              java.lang.String.class,
                               Color.class};
        editable = new boolean[]{false,true,true};
    }
    //Constructeur pour CustomClusterTableModel
    public ClustersTableModel (String[] columnNames, Class[] types, boolean[] editable){
        super(new Object [][]{},columnNames);
        this.types = types;
        this.editable = editable;
    }

    public Class getColumnClass(int column) {
        return types[column];
    }

    public boolean isCellEditable(int row, int column){
        return editable[column];
     }


}
